import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: { title: '自述文件' },
            children:[
                {
                    path:'/home',
                    component:resolve => require(['../components/page/realTime/equipmentMonitoring.vue'],resolve),
                    meta:{title:'系统首页'}
                },
                {
                    path: '/404',
                    component: resolve => require(['../components/page/404.vue'], resolve),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: resolve => require(['../components/page/403.vue'], resolve),
                    meta: { title: '403' }
                },
                {
                    path: '/userCount',
                    component: resolve => require(['../components/page/systemSetting/UserCountManger.vue'], resolve),
                    meta: { title: '账户管理' }
                },
                {
                    path: '/userStyle',
                    component: resolve => require(['../components/page/systemSetting/UserStyleManger.vue'], resolve),
                    meta: { title: '角色管理' }
                },
                {
                    path: '/menuManagement',
                    component: resolve => require(['../components/page/systemSetting/MenuManagement.vue'], resolve),
                    meta: { title: '菜单管理' }
                },
                {
                    path: '/systemLog',
                    component: resolve => require(['../components/page/systemSetting/systemLog.vue'], resolve),
                    meta: { title: '系统日志' }
                },
                {
                    path: '/deviceDebug',
                    component: resolve => require(['../components/page/systemSetting/deviceDebug.vue'], resolve),
                    meta: { title: '设备调试' }
                },
                //组织机构管理
                {
                    path: '/regionalManger',
                    component: resolve => require(['../components/page/regional/RegionalManagement.vue'], resolve),
                    meta: { title: '组织机构管理' }
                },
                //数据字典
                {
                    path: '/dictionary',
                    component: resolve => require(['../components/page/dataDictionary/Dictionary.vue'], resolve),
                    meta: { title: '数据字典' }
                },
                //设备类型
                {
                    path: '/equipmentType',
                    component: resolve => require(['../components/page/dataDictionary/EquipmentType.vue'], resolve),
                    meta: { title: '设备类型管理' }
                },
                //设备管理
                {
                    path: '/equipmentManagement',
                    component: resolve => require(['../components/page/dataDictionary/EquipmentManagement.vue'], resolve),
                    meta: { title: '设备管理' }
                },
                //设备组管理
                {
                    path: '/equipmentGroup',
                    component: resolve => require(['../components/page/dataDictionary/equipmentGroup.vue'], resolve),
                    meta: { title: '设备组管理' }
                },
                //网关管理
                {
                    path:'/GatewayAdministration',
                    component:resolve => require(['../components/page/dataDictionary/GatewayAdministration.vue'],resolve),
                    meta:{title:'网关管理'}
                },
                //定时策略管理
                {
                    path:'/timingStrategyManagement',
                    component:resolve => require(['../components/page/dataDictionary/timingStrategyManagement.vue'],resolve),
                    meta:{title:'定时策略管理'}
                },
                //定时策略管理
                {
                    path:'/repeaterManagement',
                    component:resolve => require(['../components/page/dataDictionary/repeaterManagement.vue'],resolve),
                    meta:{title:'中继器管理'}
                },
                //gis地图
                {
                    path:'/gisMap',
                    component:resolve => require(['../components/page/realTime/gisMap.vue'],resolve),
                    meta:{title:'GIS地图'}
                },
                //gis地图
                {
                    path:'/perspectiveMap',
                    component:resolve => require(['../components/page/realTime/perspectiveMap.vue'],resolve),
                    meta:{title:'透视地图'}
                },
                //gis地图
                {
                    path:'/equipmentMonitoring',
                    component:resolve => require(['../components/page/realTime/equipmentMonitoring.vue'],resolve),
                    meta:{title:'设备监控'}
                },
                //charts
                {
                    path:'/echarts',
                    component:resolve => require(['../components/page/charts/charts.vue'],resolve),
                    meta:{title:'图表分析'}
                },
                {
                    path:'/editMap',
                    component:resolve => require(['../components/page/charts/editMap.vue'],resolve),
                    meta:{title:'编辑地图'}
                },
                {
                    path:'/energySummary',
                    component:resolve => require(['../components/page/charts/energySummary.vue'],resolve),
                    meta:{title:'能耗汇总'}
                },
                {
                    path:'/energyStatisticBuild',
                    component:resolve => require(['../components/page/charts/energyStatisticBuild.vue'],resolve),
                    meta:{title:'能耗统计'}
                },
                {
                    path:'/energyStatisticDevice',
                    component:resolve => require(['../components/page/charts/energyStatisticDevice.vue'],resolve),
                    meta:{title:'设备能耗统计'}
                },
                {
                    path:'/energyFormBuild',
                    component:resolve => require(['../components/page/table/energyFormBuild.vue'],resolve),
                    meta:{title:'能耗报表'}
                },
                {
                    path:'/energyRanking',
                    component:resolve => require(['../components/page/table/energyRanking.vue'],resolve),
                    meta:{title:'建筑能耗排名'}
                }, {
                    path:'/SelfEditOrg',
                    component:resolve => require(['../components/page/systemSetting/SelfEditOrg.vue'],resolve),
                    meta:{title:'自定义组织配置'}
                },
                {
                    path:'/SelfEditTable',
                    component:resolve => require(['../components/page/systemSetting/SelfEditTable.vue'],resolve),
                    meta:{title:'自定义统计配置'}
                },
                {
                    path:'/EquipmentLimit',
                    component:resolve => require(['../components/page/systemSetting/EquipmentLimit.vue'],resolve),
                    meta:{title:'设备权限管理'}
                },
                {
                    path:'/EquipmentModel',
                    component:resolve => require(['../components/page/systemSetting/EquipmentModel.vue'],resolve),
                    meta:{title:'设备模板'}
                },
                {
                    path:'/dataReinput',
                    component:resolve => require(['../components/page/dataDictionary/dataReinput.vue'],resolve),
                    meta:{title:'数据录入'}
                },
                {
                    path:'/BigFull',
                    component:resolve => require(['../components/page/BigFull.vue'],resolve),
                    meta:{title:''}
                },
                {
                    path:'/equimentparam',
                    component:resolve => require(['../components/page/equimentparam/index.vue'],resolve),
                    meta:{title:'设备参数'}
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
